<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<!--
        IE=edge：让IE使用最新的渲染模式，针对ie8 (7,8的渲染模式是不一样的)
        http://blog.csdn.net/www3300300/article/details/12992489
    -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!--
        针对移动设备,网站显示宽度等于设备屏幕显示宽度,内容缩放比例为1:1
        http://www.cnblogs.com/yuzhongwusan/p/4184923.html
    -->
<meta name="viewport" content="width=device-width, initial-scale=1">

<!--将下面的 <meta> 标签加入到页面中，可以让部分国产浏览器默认采用高速模式渲染页面：-->
<meta name="renderer" content="webkit">
<!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
<title>Bootstrap 101 Template</title>

<!-- Bootstrap -->
<link href="websrc/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="websrc/css/mydeck.css">
<link rel="stylesheet" href="websrc/css/common.css">
<link rel="stylesheet" type="text/css"
	href="websrc/css/htmleaf-demo.css">
<link rel="stylesheet" href="websrc/jQuery-tck/css/common.css">
<link rel="stylesheet" href="websrc/css/lanrenzhijia.css">
<link rel="stylesheet" href="websrc/css/style.css">


<!--下面这一大块的注释是说:"为了让IE9以下的浏览器支持响应式和HTML5标签.需要引入下面两个JS文件"-->
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
    <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
<script src="websrc/js/jquery-3.2.1.js"></script>
<script src="websrc/js/mydeck.js"></script>

</head>
<body>
	<div class="header clearfix" style=" font-size: 14px">
		<nav class="navbar navbar-default">
			<div class="container-fluid">
				<!-- Brand and toggle get grouped for better mobile display -->
				<div class="navbar-header">
					<button type="button" class="navbar-toggle collapsed"
						data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"
						aria-expanded="false">
						<span class="sr-only">Toggle navigation</span> <span
							class="icon-bar"></span> <span class="icon-bar"></span> <span
							class="icon-bar"></span>
					</button>
					<a class="navbar-brand header-left clearfix" href="#">
						<div class="logo">LOGO</div>
						<div class="projectName">记忆宫殿</div>
						<div class="projectEnglishName">Memory Palace</div>
					</a>
				</div>

				<!-- Collect the nav links, forms, and other content for toggling -->
				<div class="collapse navbar-collapse"
					id="bs-example-navbar-collapse-1">
					<ul class="nav navbar-nav">
						<li><a href="/memorypalace/index-login.html">个人首页</a></li>
						<li><a href="/memorypalace/study/getsl.action">学习列表</a></li>
						<li class="active"><a
							href="/memorypalace/mydeck.html">浏览牌组<span
								class="sr-only">(current)</span></a></li>
						<li><a href="/memorypalace/myknowledgetree.html">知识体系</a></li>


					</ul>

				<ul class="nav navbar-nav navbar-right" style="padding-top: 28px;padding-right: 20px">
					
					<c:if test="${users.userId==null}">
							<a href="login.jsp">登录</a>
							<a href="register.jsp">注册</a>
						</c:if>
						<c:if test="${users.userId!=null}">
							<span>${users.userName}</span>
						</c:if>			
								
					<%-- <li><a href="#">${users.userName}</a></li> --%>
				</ul>
			</div>
			<!-- /.container-fluid -->
		</nav>
	</div>

	<input type="hidden" id="addFlag" value="${addFlag}" />
	<div class="box">
		<div class="demo" style="padding-left:1160px">
			<a href="javascript:;" class="bounceIn" style="background:white"><font
				size="5.5">+</font></a>
		</div>

		<div id="dialogBg"></div>
		<div id="dialog" class="animated">
			<img class="dialogIco" width="50" height="50"
				src="websrc/jQuery-tck/images/jia.png" alt="" />
			<div class="dialogTop">
				<a href="javascript:;" class="claseDialogBtn">关闭</a>
			</div>
			<form action="" method="post" id="editForm">
				<ul class="editInfos">
					<li><label>牌组名：<input type="text" name="deckName"
							id="deckName" class="ipt" /></label></li>
					<li><input type="submit" value="添加" class="submitBtn"
						onclick="afterAddDeck()" /></li>
				</ul>
			</form>
		</div>
	</div>

	<div class="container" style="background-color: #F8F8F8">
		<div class="btn-wrapper">
			<strong>显示为：</strong>
			<div class="btn-group">
				<a href="#" id="list" class="btn btn-default btn-sm"><span
					class="glyphicon glyphicon-th-list"> </span>列表布局</a> <a href="#"
					id="grid" class="btn btn-default btn-sm"><span
					class="glyphicon glyphicon-th"></span>网格布局</a>
				<div></div>
			</div>

		</div>

		<div id="products" class="row list-group" style="margin-top: 10px">
			<c:forEach items="${bean.data}" var="deck" varStatus="index">
				<div class="item  col-xs-4 col-lg-4">
					<input class="deckId" type="hidden" id="deckId${index.count}"
						value="${deck.deckId}">
					<div class="thumbnail">
						<br> <br> <br> <a
							href="/memorypalace/cardaction_getnotesbydeckId.action?deckId=${deck.deckId}"><div
								class="caption" onClick="getCards()">
								<h4 id="_name${index.count}"
									class="group inner list-group-item-heading"
									style="text-align: center">${deck.deckName}</h4>
							</div></a>
						<div class="row">
							<div class="col-xs-12 col-md-6">
								<p class="lead"></p>
							</div>
							<div class="col-md-6" id="hidden_button"
								style="margin-left: 250px">
								<a class="btn btn-success theme-login" id="xiugai${index.count}"
									onclick="modify(this.id)">修改</a><a href="javascript:shanchu()"
									class="btn btn-success">删除</a>
							</div>
						</div>
					</div>
				</div>
			</c:forEach>
		</div>

	</div>


	<div class="theme-popover">
		<div class="theme-poptit">
			<Button href="javascript:;" title="关闭" class="close"
				style="background-color: none">×</Button>
			<h3>MODIFICATION</h3>
		</div>
		<div class="theme-popbod dform">
			<form class="theme-signin" name="loginform" method="post">
				<ol>

					<li><strong>牌组名：</strong><input id="inputdeckName"
						style="height: 30px" class="ipt1" type="text" name="deckName"
						size="20" /></li>
					<li><input style="margin-left: -40px;margin-top: 20px"
						class="btn1 btn1-primary" type="submit" name="submit" value="修改"
						onclick="afterModifyDeck()" /></li>
				</ol>
			</form>

		</div>
	</div>

















	<!--中:必须在JS文件引入之前引入JQ文件,这里src引用的是本地.线上建议使用CDN引用)
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
	<script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
	<!-- Include all compiled plugins (below), or include individual files as needed，bootstrap.min.js是基于jquery的 -->
	<script src="websrc/js/bootstrap.min.js"></script>
</body>
</html>